package com.xukj;

import com.xukj.api.Hello;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Client {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
                new String[] {"META-INF/spring/client.xml"});
        context.start();
        Hello demoService = (Hello)context.getBean("hello"); // 获取远程服务代理
        String hello = demoService.sayHello("xukj"); // 执行远程方法
        System.out.println( hello ); // 显示调用结果
    }
}
